home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / awt / DisplayMode.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  950 b   |  48 lines

  1. package java.awt;
  2.  
  3. public final class DisplayMode {
  4.    private Dimension size;
  5.    private int bitDepth;
  6.    private int refreshRate;
  7.    public static final int BIT_DEPTH_MULTI = -1;
  8.    public static final int REFRESH_RATE_UNKNOWN = 0;
  9.  
  10.    public DisplayMode(int var1, int var2, int var3, int var4) {
  11.       this.size = new Dimension(var1, var2);
  12.       this.bitDepth = var3;
  13.       this.refreshRate = var4;
  14.    }
  15.  
  16.    public int getHeight() {
  17.       return this.size.height;
  18.    }
  19.  
  20.    public int getWidth() {
  21.       return this.size.width;
  22.    }
  23.  
  24.    public int getBitDepth() {
  25.       return this.bitDepth;
  26.    }
  27.  
  28.    public int getRefreshRate() {
  29.       return this.refreshRate;
  30.    }
  31.  
  32.    public boolean equals(DisplayMode var1) {
  33.       if (var1 == null) {
  34.          return false;
  35.       } else {
  36.          return this.getHeight() == var1.getHeight() && this.getWidth() == var1.getWidth() && this.getBitDepth() == var1.getBitDepth() && this.getRefreshRate() == var1.getRefreshRate();
  37.       }
  38.    }
  39.  
  40.    public boolean equals(Object var1) {
  41.       return var1 instanceof DisplayMode ? this.equals((DisplayMode)var1) : false;
  42.    }
  43.  
  44.    public int hashCode() {
  45.       return this.getWidth() + this.getHeight() + this.getBitDepth() * 7 + this.getRefreshRate() * 13;
  46.    }
  47. }
  48.